class UsersController < ApplicationController 
skip_before_filter :confirm_is_admin, :only => [:index,:new,:create,:show,:log_in]
skip_before_filter :confirm_logged_in, :only =>[:new, :create]
def index
    @users = User.all
  end
  def new
    @user = User.new
  end
  def show
    @myuser = User.find(params[:id])
    @myproject = @myuser.DevProjects
end
def create
  @user = User.new(params[:user])  
  if @user.save
      flash[:notice] = "Du är registerad"
      redirect_to :action => 'new'
  else
  render "new"
  end
end 
def destroy
  @User = User.find(params[:id])
  @User.destroy
  redirect_to dev_projects_path
end  
end